package com.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.dao.AssessorResultDao;
import com.example.entity.Result;
import com.example.service.AssessorResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 陈俊杰
 */
@Service
public class AssessorResultServiceImpl extends ServiceImpl<AssessorResultDao,Result> implements AssessorResultService{

    @Autowired
    private AssessorResultDao assessorResultDao;

    @Override
    public Boolean setResult(String id, Integer is) {
        Boolean b;
        if(is==0){
            b=assessorResultDao.updateFirstBySid(id,is.toString());
        }else if(is==1){
            b=assessorResultDao.updateFirstBySid(id,is.toString());
        }else{
            b=assessorResultDao.updateNoBySid(id,is.toString());
        }
        return b;
    }
}
